package com.po;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="t_jiatiao")
public class Jiatiao implements java.io.Serializable {

	// Fields
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String name;
	private String content;
	private int grade;
	@OneToMany(fetch=FetchType.EAGER,mappedBy="jiatiao")
	private Set<Record> rs;
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="u_id")
	private User user;
	// Constructors

	/** default constructor */
	public Jiatiao() {
	}

	/** full constructor */



	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getGrade() {
		return grade;
	}

	public void setGrade(int grade) {
		this.grade = grade;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Set<Record> getRs() {
		return rs;
	}

	public void setRs(Set<Record> rs) {
		this.rs = rs;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}